Mega Code Archive
Numerical Math Functions
1) ABS(10)
2) ABS(-10) (2)
3) ABS(-123) ABS(0) ABS(456) SIGN(-123) SIGN(0) SIGN(456)
4) ABS(x) gets the absolute value of x
5) ACOS(1)
6) ACOS(-1) (2)
7) ASIN(1)
8) ASIN(-1) (2)
9) ATAN(1)
10) ATAN(-1) (2)
11) ATAN2(1, -1)
12) BITAND(0, 0)
13) BITAND(0, 1)
14) BITAND(1, 0)
15) BITAND(1, 1)
16) BITAND(1010, 1100)
17) CEIL for negative value
18) CEIL(-5 2)
19) CEIL(5 8)
20) CEIL(x) gets the smallest integer greater than or equal to x
21) Combine case statement with mod function
22) Common numerical manipulation functions
23) COS(45 3 1415926)
24) COS(90 3 1415926)
25) COSH(3 1415926)
26) Demonstrates the ROUND function
27) EXP(1)
28) EXP(2)
29) FLOOR for negative value
30) FLOOR(-5 2)
31) FLOOR(5 8)
32) FLOOR(x) gets the largest integer less than or equal to x
33) Get the log of 8, base 2
34) Hyperbolic Trig Functions
35) List all employee with odd employee number
36) Log and Exponential Functions
37) LOG(2, 4)
38) LOG(2, 5)
39) MOD function in action
40) MOD(8, 3)
41) MOD(8, 4)
42) MOD(x, y) gets the remainder when x is divided by y
43) Numeric Functions List
44) Ordinary Trigonometry Functions
45) POWER(2, 1)
46) POWER(2, 3)
47) POWER(x, y) gets the result of x raised to the power y
48) ROUND column value
49) ROUND for negative value
50) ROUND may have a second argument to handle precision
51) ROUND(345 678,2) ROUND(345 678,-1) ROUND(345 678,-2)
52) ROUND(5 75)
53) ROUND(5 75, 1)
54) ROUND(5 75, -1) (2)
55) Round(sqrt(sal),2)
56) ROUND(x, [y]) gets the result of rounding x an optional y decimal places
57) Select ln(32)
58) Select mod(8,3), mod(13,0)
59) Select power(2,3), power(-2,3)
60) Select round(345 678), ceil(345 678), floor(345 678)
61) Select sin(303 14159265180)
62) Select tanh(0 5)
63) SIGN(0)
64) SIGN(-5)
65) SIGN(5) (2)
66) SIGN(x) gets the sign of x SIGN() returns -1 if x is negative, 1 if x is positive, or 0 if x is zero
67) SIN(0)
68) SIN(303 14159265180) TANH(0 5) EXP(4) LOG(2,32) LN(32)
69) SINH(1)
70) SQRT and ABS
71) SQRT(25)
72) SQRT(5)
73) SQRT(x) gets the square root of x
74) TANH(1)
75) The second argument of ROUND defaults to 0
76) The second argument of TRUNC defaults to 0
77) TRUNC column value
78) TRUNC may have a second argument to handle precision
79) TRUNC(5 75)
80) TRUNC(5 75, 1)
81) TRUNC(5 75, -1) (2)
82) TRUNC(x, [y]) gets the result of truncating the number x to an optional y decimal places
83) Use ABS for column data
84) Use CEIL function to get the ceiling value
85) Use floor and mod to get the number of days
86) Use FLOOR function to get the flooring value
87) Use floor to get the number of weeks
88) Use floor(), mod() and date calculation to show how many weeks and days an employee has been working here
89) Use mod() function to get all event employee id
90) Use SIGN function to deal with column data
91) Use SQRT in column data
92) Using SQRT and ABS together
93) Using the COS function to find the cosine of 60 degrees
94) Using the COSH function to find the hyperbolic cosine of 30 degrees
95) Using the EXP function
96) Using the LN function
97) Using the LOG function
98) Using the POWER function
99) Using the SIN function to find the sine of 30 degrees
100) Using the SINH function to find the hyperbolic sine of 30 degrees
101) Using the TAN function to find the tangent of 30 degrees
102) Using the TANH function to find the hyperbolic tangent of 30 degrees
103) V_double_nr
104) V_float_nr